<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h2>name:{{user.name}}</h2>
      <h2>age:{{user.age}}</h2>
    </div>
    <script type="module">
      import { createApp, ref, reactive, nextTick } from "./vue.esm-browser.js";
      const app = createApp({
        setup() {
          // const user = reactive(100)
          const user = reactive({ name: "jack", age: 20 });
          // console.log(user.value.name);
          console.log(user.name);
          return {
            user,
          };
        },
      });
      app.mount("#app"); //挂载
    </script>
  </body>
</html>
